package ${package}.db.model;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.fasterxml.jackson.annotation.JsonFormat;

<#list imports as i>
import ${i!};
</#list>

/**
 * ${tableComment}
 *
 * @author ${author} ${email}
 * @since ${version} ${date}
 */
@Data
@EqualsAndHashCode()
@TableName("${tableName}")
public class ${ClassName} {

<#list columnList as column>
	<#if column.columnComment!?length gt 0>
	/**
	 * ${column.columnComment}
	 */
	</#if>
	<#if "creator,create_time,deleted,input_channel,entry_method,create_user_id,update_user_id"?split(",")?seq_contains(column.columnName)>
	@TableField(fill = FieldFill.INSERT)
	</#if>
	<#if "updater,update_time,filled_by,filled_date"?split(",")?seq_contains(column.columnName)>
	@TableField(fill = FieldFill.INSERT_UPDATE)
	</#if>
	<#if column.pk>
	@TableId(type = IdType.AUTO)
	</#if>
	<#if column.attrType == 'Long'>
	@JsonFormat(shape = JsonFormat.Shape.STRING)
	</#if>
	private ${column.attrType} ${column.attrName};

</#list>
}